package com.dodayum.service;

import com.dodayum.po.User;
import org.apache.log4j.BasicConfigurator;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Consumer {

    public static void main(String[] args) throws InterruptedException {
        System.setProperty("java.net.preferIPv4Stack", "true");
        BasicConfigurator.configure();
        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("consumer.xml");
        // 测试
//        UserService bean = context.getBean(UserService.class);
//        User user = new User();
//
//        while (true) {
//            user.setUserName("abc");
//            String s = bean.sayHello(user);
//            System.out.println(s);
//            Thread.sleep(100);
//        }
    }

}
